
import java.util.*;
class Rect {
    private int length;
    private int width;

    public Rect(int length) {
        this.length = length;
    }
    public Rect(int length,int width) {
        this.length = length;
        this.width = width;
    }

    public int getArea() {
        return length*width;
    }

    public int getLen() {
        return (length+width)*2;
    }

}

public class Main1 {
    public static void main(String []args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()){
            String s = sc.nextLine();
            String[] s1 = s.split(" ");
            int len = Integer.valueOf(s1[0]);
            int wid = 0;
            if (s1.length > 1) {
                wid = Integer.valueOf(s1[1]);
            }

            if (len < 0) {
                System.out.printf("0 0 0 0\n");
            } else if (wid == 0) {
                Rect rect = new Rect(len);
                int area = rect.getArea();
                int lens = rect.getLen();
                System.out.println(len + " " + len + " " + lens + " " + area);
            } else {
                Rect rect = new Rect(len, wid);
                int area = rect.getLen();
                int lens = rect.getArea();
                System.out.println(len + " " + wid + " " + lens + " " + area);
            }


        }
    }
}